/**
 * 
 */
package pl.s7n.paint.edits;

import java.util.List;

import javax.swing.undo.UndoableEditSupport;

public class AbstractEditManager<T> {

  protected UndoableEditSupport undoableEditSupport;

  protected List<T>             actions;

  public AbstractEditManager(UndoableEditSupport undoableEditSupport) {
    this.undoableEditSupport = undoableEditSupport;
  }

  public void editPerformed(T action) {
    actions.add(action);
  }

  public void reset() {
    actions.clear();
  }
  
  public boolean hasActions() {
    return !actions.isEmpty();
  }
}
